package com.sumer.psychology.blog.application.command;

import com.sumer.psychology.common.domain.model.Author;
import com.sumer.psychology.common.port.adapter.service.AuthorCommand;
import com.sumer.psychology.tag.domain.model.Tag;

import java.util.Set;

/**
 * 创建Blog
 * <p/>
 * User: zhenguang.zhu
 * Date: 2014/8/11
 * Time: 10:33
 */
public class CreateBlogCommand implements AuthorCommand {
    private Author author;
    private String title;
    private String content;
    private String categoryId;

    public CreateBlogCommand(Author author, String title, String content) {
        this.author = author;
        this.title = title;
        this.content = content;
    }

    public CreateBlogCommand(Author author, String title, String content, String categoryId) {
        this(author, title, content);
        this.categoryId = categoryId;
    }

    @Override
    public Author author() {
        return author;
    }

    public String title() {
        return title;
    }

    public String content() {
        return content;
    }

    public String categoryId() {
        return categoryId;
    }

    @Override
    public void setAuthor(Author author) {
        this.author = author;
    }

    @Override
    public String toString() {
        return "CreateBlogCommand{" +
                "author=" + author +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", categoryId='" + categoryId + '\'' +
                '}';
    }
}
